package com.aspose.cells.a.d;

public class zr {
   public static int a(int[] var0, int var1, int var2, int var3) {
      int var4 = var1;
      int var5 = var1 + var2 - 1;

      while(var4 <= var5) {
         int var6 = var4 + var5 >> 1;
         int var7 = var0[var6];
         if (var7 == var3) {
            return var6;
         }

         if (var7 < var3) {
            var4 = var6 + 1;
         } else {
            var5 = var6 - 1;
         }
      }

      return ~var4;
   }
}
